\version "2.24.3"

backslashHead = {
  \once \override NoteHead.stencil = #ly:text-interface::print
  \once \override NoteHead.X-offset = #0.4
  \once \override NoteHead.text = \markup \concat {
    \musicglyph "noteheads.s2"
    \hspace #-1.6
    \lower #0.6 {
      \override #'(thickness . 2)
      \draw-line #'(-1.75 . 1.25)
    }
  }
}

#(set-default-paper-size '(cons (* 210 mm) (* 5000 mm)))

\header {
  tagline = #f
}

gtrOne = \relative {
  \newSpacingSection
  \override Score.SpacingSpanner.spacing-increment = #0.2
  \once \override Staff.TimeSignature.stencil = ##f
  \key f \major
  \tempo 4 = 192
  \partial 256 s256 |
  \newSpacingSection
  \revert Score.SpacingSpanner.spacing-increment
  \repeat volta 2 {
    \time 3/4
    a4 a r |
    \time 5/4
    bes4 a aes f aes |
    \time 3/4
    a?4 a r |
    \time 5/4
    bes4 bes a f aes |
  }
}

gtrTwo = \relative {
  \once \override Staff.TimeSignature.stencil = ##f
  \key f \major
  \tempo 4 = 192
  \partial 256 s256 |
  \repeat volta 2 {
    \time 3/4
    f4 f r |
    \time 5/4
    ees4 d des d ees |
    \time 3/4
    f4 f r |
    \time 5/4
    ees4 ees d d ees |
  }
}

bass = \relative {
  \once \override Staff.TimeSignature.stencil = ##f
  \key f \major
  \tempo 4 = 192
  \partial 256 s256 |
  \repeat volta 2 {
    \time 3/4
    f,4 f r |
    \time 5/4
    d4 d des d b |
    \time 3/4
    f'4 f r |
    \time 5/4
    d4 d d c d |
  }
}

kitOne = \drummode {
  \once \override Staff.TimeSignature.stencil = ##f
  \tempo 4 = 192
  \partial 256 s256 |
  \repeat volta 2 {
    \time 3/4
    cymr4-> hh \backslashHead sn-> |
    \time 5/4
    hho4 r hh <sn hh>8 tomml <tomfh hh>4 |
    \time 3/4
    cymr4-> hh \backslashHead sn-> |
    \time 5/4
    hho4 r hho <sn hho> tomfh |
  }
}

kitTwo = \drummode {
  \once \override Staff.TimeSignature.stencil = ##f
  \tempo 4 = 192
  \partial 256 s256 |
  \repeat volta 2 {
    \time 3/4
    bd2. |
    \time 5/4
    bd4 hhp bd2 bd4 |
    \time 3/4
    bd2. |
    \time 5/4
    bd4 hhp bd2. |
  }
}

fullScore = <<
  \new Staff \with {
    midiInstrument = "electric guitar (clean)"
    midiPanPosition = #-1.0
  } {
    \clef "treble_8"
    \tag #'folded { \gtrOne }
    \tag #'unfolded { \unfoldRepeats \gtrOne }
  }

  \new Staff \with {
    midiInstrument = "electric guitar (jazz)"
    midiPanPosition = #1.0
  } {
    \clef "treble_8"
    \tag #'folded { \gtrTwo }
    \tag #'unfolded { \unfoldRepeats \gtrTwo }
  }

  \new Staff \with {
    midiInstrument = "electric bass (pick)"
    midiPanPosition = #0.0
  } {
    \clef "bass_8"
    \tag #'folded { \bass }
    \tag #'unfolded { \unfoldRepeats \bass }
  }

  \tag #'folded {
    \new DrumStaff \with { drumStyleTable = #weinberg-drums-style } <<
      \new DrumVoice { \voiceOne \kitOne }
      \new DrumVoice { \voiceTwo \kitTwo }
    >>
  }
  \tag #'unfolded {
    \new DrumStaff \with { drumStyleTable = #weinberg-drums-style } <<
      \new DrumVoice { \unfoldRepeats { \voiceOne \kitOne } }
      \new DrumVoice { \unfoldRepeats { \voiceTwo \kitTwo } }
    >>
  }
>>

\score {
  \removeWithTag #'unfolded
  \fullScore

  \layout {
    indent = 0

    \context {
      \Score
      \override Glissando.minimum-length = #4
      \override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods
      \override Glissando.thickness = #2
    }

    \context {
      \StaffGroup
      \RemoveAllEmptyStaves
    }
  }
}

\score {
  \removeWithTag #'folded
  \fullScore

  \midi { }
}
